package com.ibeeking.found.open.b.rest.service;

import com.ibeeking.found.open.service.common.vo.UrlVO;
import com.ibeeking.found.open.service.common.vo.OpenAuthVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName IWxCpTpEventService 企业微信授权服务
 * @Description
 * @Author ibeeking
 * @Date 2021-06-18 12:21
 **/

public interface IWxCpDkEventService {

    /**
     * 企业微信接收凭据ticket事件
     *
     * @param echostr         加密数据
     * @param timestamp    时间戳
     * @param nonce        随机字符串
     * @param signature    签名

     * @return
     */
    String authWxCpDkTicket(HttpServletRequest request, HttpServletResponse response, String signature, String timestamp, String nonce, String echostr);

    /**
     * 企业微信消息事件
     *
     * @param requestBody         加密数据
     * @param timestamp    时间戳
     * @param nonce        随机字符串
     * @param signature    签名
     * @return
     */
    Object msgWxCpDkEvent(HttpServletRequest request, HttpServletResponse response, String signature, String timestamp, String nonce, String requestBody);
    /**
     * 获取授权注册页面扫码授权url   显示二维码
     *
     * @param request
     * @return
     * @throws Exception
     * @Author ibeeking
     */
    UrlVO getWxCpDkPreAuthUrl(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 查询授权企业微信授权信息
     *
     * @return
     * @throws Exception
     * @Author ibeeking
     */
    OpenAuthVO queryWxCpDkOpenAuthInfo();

}
